package com.gitee.wsl.statemachine.transition

import kotlin.reflect.KClass

typealias KTransition<FROM,TO> = Transition<KClass<FROM>, KClass<TO>>

/**
 * Describes the transition rule state. Makes a transition to the same state
 *
 * In generic contains [state][State]
 * Defines [predicate] and [transform] functions
 */
abstract class SelfTransition<STATE>(val state:STATE) : Transition<STATE, STATE>(state,state)

/**
 * Describes the transition rule between states.
 * In generic contains [initial state][fromState] and [destination state][toState].
 * Defines [predicate] and [transform] functions
 */
abstract class Transition<FROM , TO>(val beforeState:FROM,val toState: TO){}